package com.yidu.king.service.impl;

import com.yidu.king.controller.vo.PersonFeiziVo;
import com.yidu.king.dao.PersonFeiziMapper;
import com.yidu.king.domain.PersonFeizi;
import com.yidu.king.service.PersonFeiziService;
import com.yidu.king.utils.BaseMessage;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>@author yidu-xia</p>
 * <p>@Date: 2021/1/13</p>
 * <p>@Time: 16:29</p>
 * <p>@Description: 妃子侍寝类 </p>
 */
@Service
public class PersonFeiziServiceImpl implements PersonFeiziService {
    @Resource
    PersonFeiziMapper personFeiziMapper;

    /**
     * 查询人员
     *
     * @param vo
     * @return
     */
    @Override
    public List<PersonFeiziVo> selectAll(PersonFeiziVo vo) {
        return personFeiziMapper.selectAll(vo);
    }

    /**
     * 查询行数
     *
     * @param vo
     * @return
     */
    @Override
    public int selectCount(PersonFeiziVo vo) {
        return personFeiziMapper.selectCount(vo);
    }

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return personFeiziMapper.deleteByPrimaryKey(id);
    }

//    增加
    @Override
    public int insertSelective(PersonFeizi record) {
        personFeiziMapper.insertSelective(record);
        return record.getId();
    }

    @Override
    public PersonFeiziVo selectByPrimaryKey(Integer id) {
        return personFeiziMapper.selectByPrimaryKey(id);
    }
//    修改
    @Override
    public int updateByPrimaryKeySelective(PersonFeizi record) {
        personFeiziMapper.updateByPrimaryKeySelective(record);
        return record.getId();
    }

    /**
     * 批量删除
     * @param ids
     * @return
     */
    @Override
    public int deleteAll(String ids) {
        return 0;
    }

    @Override
    public BaseMessage addOrUpdate(PersonFeiziVo personFeiziVo) {
        return null;
    }


}
